<!DOCTYPE html>
{% import 'admin/layout.html' as layout with context -%}
{% import 'flask-admin/layout.html' as adminlte_layout with context -%}
{% import 'admin/static.html' as admin_static with context %}
{% import 'flask-admin/static.html' as adminlte_static with context %}
<html lang="en">
<head>
    <title>{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} -
        {{ admin_view.admin.name }}{% endblock %}</title>
    {% block head_meta %}
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
    {% endblock head_meta %}

    {% block head_css %}
        <!-- Bootstrap 4.2.1 -->
        <link href="{{ admin_static.url(filename='bootstrap/bootstrap4/css/bootstrap.min.css', v='4.2.1') }}"
              rel="stylesheet">
        <!-- Font Awesome -->
        <link rel="stylesheet" href="{{ adminlte_static.url('plugins/fontawesome-free/css/all.min.css') }}">
        <!-- Ionicons -->
        <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
        <!-- Tempusdominus Bootstrap 4 -->
        <link rel="stylesheet"
              href="{{ adminlte_static.url('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
        <link rel="stylesheet" href="{{ adminlte_static.url('plugins/select2/css/select2.min.css') }}" rel="stylesheet"
              type="text/css">
        <!-- iCheck -->
        <link rel="stylesheet" href="{{ adminlte_static.url('plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
        <!-- JQVMap -->
        <link rel="stylesheet" href="{{ adminlte_static.url('plugins/jqvmap/jqvmap.min.css') }}">
        <!-- Theme style -->
        <link rel="stylesheet" href="{{ adminlte_static.url('dist/css/adminlte.css') }}">
        <!-- overlayScrollbars -->
        <link rel="stylesheet"
              href="{{ adminlte_static.url('plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
        <!-- Daterange picker -->
        <link rel="stylesheet" href="{{ adminlte_static.url('plugins/daterangepicker/daterangepicker.css') }}">
        <!-- summernote -->
        <link rel="stylesheet" href="{{ adminlte_static.url('plugins/summernote/summernote-bs4.min.css') }}">

        <link href="{{ admin_static.url(filename='admin/css/bootstrap4/admin.css', v='1.1.1') }}" rel="stylesheet">
        <link href="{{ admin_static.url(filename='bootstrap/bootstrap4/css/font-awesome.min.css', v='4.7.0') }}"
              rel="stylesheet">
        <link href="{{ admin_static.url(filename='admin/css/bootstrap4/submenu.css') }}" rel="stylesheet">
        {% if admin_view.extra_css %}
            {% for css_url in admin_view.extra_css %}
                <link href="{{ css_url }}" rel="stylesheet">
            {% endfor %}
        {% endif %}
        <style>
            .hide {
                display: none;
            }
        </style>

    {% endblock head_css %}

    {% block head %}
    {% endblock head %}

    {% block head_tail %}
    {% endblock head_tail %}
</head>

<body class="hold-transition sidebar-mini layout-fixed">
{% block page_body %}
    <div class="wrapper">
        {% block preloader %}
        {% endblock %}

        <nav class="main-header navbar navbar-expand navbar-white navbar-light">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
                </li>
            </ul>

            {% block nav_control %}
            {% endblock %}

            <ul class="navbar-nav ml-auto">
                {% block access_control %}
                {% endblock %}
            </ul>

            {% block menu_links %}
                <ul class="navbar-nav navbar-right">
                    {{ layout.menu_links() }}
                </ul>
            {% endblock %}
        </nav>

        <aside class="main-sidebar sidebar-dark-primary elevation-4">
            <!-- Logo -->
            {% block brand %}
                <a href="{{ admin_view.admin.url }}" class="brand-link">
                    <img src="{{ adminlte_static.url('dist/img/AdminLTELogo.png') }}" alt="AdminLTE Logo"
                         class="brand-image img-circle elevation-3"
                         style="opacity: .8">
                    <span class="brand-text font-weight-light">{{ admin_view.admin.name }}</span>
                </a>
            {% endblock brand %}

            <div class="sidebar">
                {% block user_panel %}
                {% endblock user_panel %}

                {% block main_menu %}
                    <nav class="mt-2">
                        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                            data-accordion="false">
                            {{ adminlte_layout.menu() }}
                        </ul>
                    </nav>
                {% endblock main_menu %}
            </div>
        </aside>

        <div class="content-wrapper">
            <div class="content">
                <div class="container-fluid">
                    {% block messages %}
                        {{ layout.messages() }}
                    {% endblock %}

                    {% set render_ctx = h.resolve_ctx() %}

                    {% block body %}
                    {% endblock %}
                </div>
            </div>
        </div>
    </div>
{% endblock page_body %}

{% block tail_js %}
    <script src="{{ adminlte_static.url('plugins/jquery/jquery.min.js') }}"></script>
    <script src="{{ admin_static.url(filename='bootstrap/bootstrap4/js/popper.min.js') }}"
            type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='bootstrap/bootstrap4/js/bootstrap.min.js', v='4.2.1') }}"
            type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/moment.min.js', v='2.9.0') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/bootstrap4/util.js', v='4.3.1') }}"
            type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/bootstrap4/dropdown.js', v='4.3.1') }}"
            type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='admin/js/bs4_filters.js', v='1.0.0') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='admin/js/bs4_modal.js', v='1.0.0') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/select2/select2.min.js', v='4.2.1') }}"
            type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/multi-level-dropdowns-bootstrap/bootstrap4-dropdown-ml-hack.js') }}"
            type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='admin/js/helpers.js', v='1.0.0') }}" type="text/javascript"></script>
    {% if admin_view.extra_js %}
        {% for js_url in admin_view.extra_js %}
            <script src="{{ js_url }}" type="text/javascript"></script>
        {% endfor %}
    {% endif %}

    <!-- jQuery UI 1.11.4 -->
    <script src="{{ adminlte_static.url('plugins/jquery-ui/jquery-ui.min.js') }}"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
        $.widget.bridge('uibutton', $.ui.button)
    </script>
    <!-- Bootstrap 4 -->
    <script src="{{ adminlte_static.url('plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <script src="{{ adminlte_static.url('plugins/x-editable/js/bootstrap4-editable.min.js') }}"></script>
    <!-- ChartJS -->
    <script src="{{ adminlte_static.url('plugins/chart.js/Chart.min.js') }}"></script>
    <!-- ApexchartsJS -->
    <script src="{{ adminlte_static.url('plugins/apexcharts/apexcharts.min.js') }}"></script>
    <!-- Sparkline -->
    <script src="{{ adminlte_static.url('plugins/sparklines/sparkline.min.js') }}"></script>
    <!-- JQVMap -->
    <script src="{{ adminlte_static.url('plugins/jqvmap/jquery.vmap.min.js') }}"></script>
    <script src="{{ adminlte_static.url('plugins/jqvmap/maps/jquery.vmap.world.js') }}"></script>
    <!-- jQuery Knob Chart -->
    <script src="{{ adminlte_static.url('plugins/jquery-knob/jquery.knob.min.js') }}"></script>
    <!-- daterangepicker -->
    <script src="{{ adminlte_static.url('plugins/moment/moment.min.js') }}"></script>
    <script src="{{ adminlte_static.url('plugins/daterangepicker/daterangepicker.min.js') }}"></script>
    <!-- Tempusdominus Bootstrap 4 -->
    <script src="{{ adminlte_static.url('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
    <script src="{{ adminlte_static.url('plugins/select2/js/select2.min.js') }}"></script>
    <!-- Summernote -->
    <script src="{{ adminlte_static.url('plugins/summernote/summernote-bs4.min.js') }}"></script>
    <!-- overlayScrollbars -->
    <script src="{{ adminlte_static.url('plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
    <script src="{{ adminlte_static.url('dist/js/adminlte.js') }}"></script>
{% endblock tail_js %}

{% block tail %}
{% endblock tail %}

</body>
</html>
